#include <stdio.h>

char *mystrcpy(char *dest,const char *src)
{
	char *p = dest;

	while(*p++ = *src++);  //当遇到\0时结束

	return dest;
}

int main(void)
{
	char *str = "Hello,world";
	char dest[20] = {0};

	mystrcpy(dest,str);

	printf("%s\n",dest);
	return 0;
}
